fetch("url", {
  "headers": {
    "xxx": "yyy"
  },
  "referrer": "xxx",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"cmd\":8100,\"parameters\":{}}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
}).then(response => {
  // 解析响应头
  console.log("response headers:");
  response.headers.forEach(
	function(val,key) { 
	  console.log(key + ': ' + val);
	}
  );
  return response.json();       // response.json()是一个Promise()对象
}).then(data => {
  // 解析响应体
  console.log("response body:");
  console.log(data);
});